@import "./common/_variables.scss";
@import "./common/_functions.scss";
@import "./common/_extends.scss";
@import "./common/_mixins.scss";

// 公共 reset.scss_ 
@import "./common/_reset.scss";

// .list lix6 宽度 奇数:100 偶数:120

.list {

    // 1-6
    @for $i from 1 to 7 {

        // for循环 (重复的事情)
        @if($i % 2==0) {
            li:nth-child(#{$i}) {
                width: 120px;
            }
        }

        @else {
            li:nth-child(#{$i}) {
                width: 100px;
            }
        }
    }
}

@each $item in (a, b, c, d) {

    // [a,b,c,d]
    .#{$item} {
        background-image: url("/image/#{$item}.jpg");
    }
}

@function double($n) {
    @return $n * 2;
}

#sidebar {
    width: double(100px);
}